<template>
  <el-icon class="collapse-icon" @click="changeCollapse">
    <component :is="globalStore.themeConfig.isCollapse ? 'expand' : 'fold'"></component>
  </el-icon>
</template>

<script setup lang="ts">
import { GlobalStore } from "@/stores";

const globalStore = GlobalStore();
const changeCollapse = () => globalStore.setCollapse(!globalStore.themeConfig.isCollapse);
</script>

<style scoped lang="scss">
.collapse-icon {
  margin-right: 16px;
  font-size: 22px;
  color: #303133;
  cursor: pointer;
}
</style>
